package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.dto.DishDto;
import com.itheima.reggie.dto.SetmealDto;
import com.itheima.reggie.entity.Setmeal;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SetmealService extends IService<Setmeal> {

    /**
     * 新增套餐，同时需要保存套餐和菜品的关联关系
     * @param setmealDto
     */
    @Transactional
    public void saveWithDish(SetmealDto setmealDto);

    @Transactional
    //根据ID删除分类
    public void removeWithDish(List<Long> ids);

    //根据id查找
    public SetmealDto getByIdWithDish(Long id);

    //修改套餐
    public void updateWithDish(SetmealDto setmealDto);
}
